//
//  SettingCell.m
//  Qzone
//
//  Created by zhangxy on 2018/5/22.
//  Copyright © 2018年 zhang. All rights reserved.
//

#import "SettingCell.h"

@implementation SettingCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    [_switchView setTintColor:UIColorFromRGB(BgTitleColor)];
    [_switchView setOnTintColor:UIColorFromRGB(BgTitleColor)];
    
    [_labTitle attributeFont:FontFiftent textColor:UIColorFromRGB(TextSizeOneColor)];
    
    _labLine.hidden = YES;
    _labLine.backgroundColor = LINE_COLOR;
}


-(void)dataToView:(NSDictionary *)item{
    [_labTitle setText:convertToString(item[@"title"])];
    
    int code = [item[@"code"] intValue];
    _switchView.hidden = YES;
    _imgIcon.hidden = NO;
    if(code == 4){
        _switchView.hidden = NO;
        _imgIcon.hidden = YES;
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
